Lesson 0005 · ~12 min

Attention is relevance weighting

Core idea: Attention lets a token weigh which other tokens in context matter most for interpreting or generating it.

What to remember

Why it matters

This is how transformers handle long-range dependencies without processing one token at a time like an RNN.

Mental model

For a token, compute how relevant other tokens are, then mix information from them accordingly.

Checkpoint

  1. Why is attention useful for context?
  2. Why is “relevance weighting” a better description than “looking up a word”?